!function () {
    var guaranteeDetail = window.WEBBASE.extend({
        init: function () {//初始化

        },
        events: {
            ".J_look-detail click": "lookDetail",//查看详情
            "#J_sure-guarantee click": "sureGuarantee",//确定收取电子保单
        },
        /**
         * 查看详情
         * @param e
         */
        lookDetail: function (e) {
            var self = $(e.currentTarget),
                $selfbdItemCont = self.parent('.bd-item-tit').siblings('.bd-item-cont');
            if ($selfbdItemCont.is(':hidden')) {
                self.addClass('cur');
                $selfbdItemCont.fadeIn();
            } else {
                self.removeClass('cur');
                $selfbdItemCont.fadeOut()
            }

        },
        /**
         * 确定收取电子保单
         */
        sureGuarantee: function () {
            $.ajax({
                url: '',
                data: '',
                dataType: 'JSON',
                type:'POST',
                success: function (res) {
                    Tools.msg(res.msg)
                },
                error: function (res) {
                    Tools.msg(res.msg)
                }

            })
        }
    });
    guaranteeDetail.init();
}();